#ifndef DEFCOMDEF_H
#define DEFCOMDEF_H

#define DGR 3

#define SIG_MAX 6
#define SIZE_MAX 90
#define TYPE_MAX 10


//#define LIM_OO 3.2
//#define LIM_NEAR_OH 1.3
//#define LIM_FAR_OH 2.1
//#define OH_LENGTH 0.97

#define _SUCCESS 0
#define _FILENOTEXIST -1
#define _FILEERROR -2

//convert from Hartree to kcal/mol
#define HART_2_KCAL 627.509391
#define HART_2_KJ 2625.5
#define KCAL_2_HART 1.593601649e-3
#define KCAL_2_KJ 4.184
#define KJ_2_HART 3.808798324e-4
#define KJ_2_KCAL 0.2390057


enum UNITSYS{ HARTREE=0, KCALMOL=1, KJMOL=2 , DIMENSIONLESS = 3 };

typedef struct XYZ{	double x,y,z;}XYZ;

//============= usefule macro
#define SQR(x) (x)*(x)
#define FMAX(a,b) ((a) > (b) ? (a) : (b))
#define FMIN(a,b) ((a) < (b) ? (a) : (b))
#define DIST2(A,B) (SQR((A)[0]-(B)[0])+SQR((A)[1]-(B)[1])+SQR((A)[2]-(B)[2]))

#endif
